var path = require('path')

module.exports = {
  entry: {
     'vcomp':'./ts/vx/vcomp.ts',
//      'v':'./ts/vx/v.ts'
  },
  output: {
    path: './js/vx',
    filename: '[name].js'
  },
  resolve: {
    extensions: ['.ts', '.js'],
    //extensions: ['', '.js', '.vue', '.less', '.css', '.scss'],
    //fallback: [path.join(__dirname, '../node_modules')],
    alias: {
        'vue$': 'vue/dist/vue.esm.js'
    }
  },
  module: {
    rules: [
      {
        test: /\.ts$/,
        exclude: /node_modules|vue\/src/,
        loader: 'ts-loader',
        options: {
          appendTsSuffixTo: [/\.vue$/]
        }
      },
      {
        test: /\.vue$/,
        loader: 'vue-loader',
        options: {
          esModule: true
        }
      }
    ]
  },
  devtool: 'source-map'
}
